#ifndef TEST_MATHUTIL_H
#define TEST_MATHUTIL_H

#define _USE_MATH_DEFINES
#include <math.h>
#include <windows.h>


#define PI  3.1415926f

int inline round(double d)
{
    return (int)(floor(d + 0.5));
}

//returns from 0 to 1
float inline frand() 
{
    return (float)rand() / (float)(RAND_MAX);
}

//returns from Min to Max
float inline frand(float min, float max) 
{
    return (frand() * (max - min)) + min; 
}

float inline dot(float posX1, float posY1, float posX2, float posY2)
{
    return posX1 * posX2 + posY1 * posY2;
}

float inline length(float posX, float posY)
{
    return sqrt( posX * posX + posY * posY );
}

bool inline PointInRect2D(vec3 point, vec3 rectVertex1, vec3 rectVertex2, vec3 rectVertex3, vec3 rectVertex4)
{
	return false;
}

float inline DistancePointToLine(vec3 point, vec3 lineVertex1, vec3 lineVertex2)
{
	return 0.f;
}


#endif // #ifndef TEST_MATHUTIL_H
